package plus.easydo.easyuc.web.service.impl;

import cn.zhxu.bs.SearchResult;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import plus.easydo.easyuc.core.vo.UcTenantVo;
import plus.easydo.easyuc.web.convert.UcTenantConvert;
import plus.easydo.easyuc.web.entity.UcTenant;
import plus.easydo.easyuc.web.manager.UcTenantManager;
import plus.easydo.easyuc.web.service.UcTenantService;

import java.util.List;
import java.util.Map;

/**
* @author yuzhanfeng
* @description 针对表【uc_tenant(租户信息)】的数据库操作Service实现
* @createDate 2023-10-07 16:57:34
*/
@Service
@RequiredArgsConstructor
public class UcTenantServiceImpl implements UcTenantService {

    @Autowired
    private UcTenantConvert ucTenantConvert;

    private final UcTenantManager ucTenantManager;

    @Override
    public List<UcTenantVo> list() {
        List<UcTenant> list = ucTenantManager.selectList();
        return ucTenantConvert.entityToVo(list);
    }

    @Override
    public SearchResult<UcTenant> page(Map<String, Object> queryParam) {
        return ucTenantManager.selectPage(queryParam);
    }
}




